﻿#include "CmdPolarCoordinateGraphSidebarRenameSelectedGraph.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdPolarCoordinateGraphSidebarRenameSelectedGraph::CmdPolarCoordinateGraphSidebarRenameSelectedGraph()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdPolarCoordinateGraphSidebarRenameSelectedGraph::~CmdPolarCoordinateGraphSidebarRenameSelectedGraph()
    {
    }

    bool CmdPolarCoordinateGraphSidebarRenameSelectedGraph::execute()
    {
        // bool _success = false;
        emit IBaseSignalInstance->signal_polarCoordinateGraphSidebarRenameSelectedGraph(m_mainWindowId, m_name);
        return true;
    }

    void CmdPolarCoordinateGraphSidebarRenameSelectedGraph::undo()
    {
    }

    void CmdPolarCoordinateGraphSidebarRenameSelectedGraph::redo()
    {
        // execute();
    }

    void CmdPolarCoordinateGraphSidebarRenameSelectedGraph::setPolarCoordinateGraphSidebarRenameSelectedGraph(int mainWindowId, QString name)
    {
        m_mainWindowId = mainWindowId;
        m_name = name;
    }

} // namespace PostCommand
